//
//  FPSqliteManager.h
//  FilmParadise
//
//  Created by lanou3g on 15/7/22.
//  Copyright (c) 2015年 DLYgroup. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "FMDatabase.h"
#import "FPUserModel.h"
#import "FPCollectMovieModel.h"
#import "FPmainTopViewModel.h"
#import "FPIntroModel.h"
#import "FPCollectionWebModel.h"
#import "FPCollectCinemaModel.h"
#import "FPCinemaModel.h"
@interface FPSqliteManager : NSObject

+ (NSString *)filePath:(NSString *)dbName;
/**
 *  用户表
 */
+ (void)createUserTable;

+ (void)insertUserModel:(FPUserModel *)userModel;
+ (NSMutableArray *)selectAllUserName;
+ (NSMutableArray *)selectAllUserPWD;

//+ (NSMutableDictionary *)showAllUsersAccountAndPwd;

/**
 *  电影
 */
+ (void)createMovieTable;
+ (void)insertMovieModel:(FPmainTopViewModel *)movieModel;
+ (FPmainTopViewModel *)selectModelWithMovieID:(NSString *)movieID;
+ (NSMutableArray *)selectMovieTableAllMovieID;

/**
 *  收藏表
 */
+ (void)createCollectMovieTable;
+ (void)insertCollectTable:(FPCollectMovieModel *)model;
+ (NSMutableArray *)selectMovieWithUserName:(NSString *)userName;
+ (void)deleteDataWithMovieID:(NSString *)movieID;
/**
 Web表
 */
+ (void)createWebTable;
+ (void)insertWebTable:(FPIntroModel *)model;
+ (NSMutableArray *)selectAllWebTitle;
+ (FPIntroModel *)selectAllWebModelWithTitle:(NSString *)title;
+ (void)deleteWebModelWithTitle:(NSString *)title;
/**
 *  web收藏表
 */
+ (void)createWebCollectTable;
+ (void)insertWebCollectTable:(FPCollectionWebModel *)model;
+ (NSMutableArray *)selectWebCollectTitleWithUserName:(NSString *)userName;

// 影院
+ (void)createCinemaTable;
+ (void)insertCinemaTable:(FPCinemaModel *)model;
+ (NSMutableArray *)selectAllCinemaName;
+ (FPCinemaModel *)selectCinemaModelWithCinemaName:(NSString *)cinemaName;


// 影院收藏
+ (void)createCinemaCollectTable;
+ (void)insertCinemaCollectTable:(FPCollectCinemaModel *)model;
+ (NSMutableArray *)selectCinemaCollectWithUserName:(NSString *)userName;
+ (void)deleteCinemaModelWithCinemaName:(NSString *)cinemaName;

@end
